<?php

session_cache_expire(999999999);
$q = $_GET["q"];

include 'operations/connection.php';

$sql = "SELECT e.IDEmployee,e.FullName FROM employee e, department d WHERE e.IDDepartment=d.IDDepartment AND d.IDDepartment='$q' AND State=1;";

$result = mysql_query($sql);

echo "<table width='100%' class='templ' cellspacing='0'>
	                            	<tr class='titapp titapp2'>
	                                	<td><div align='center'>Employee List</div></td>
	                                    <td width='50px'>
	                                   	</td>
	                                </tr>";

while ($row = mysql_fetch_array($result)) {
    echo "<tr >";
    echo "<td>" . $row['FullName'] . "</td>";
    echo "<td width='50px'>";
    echo "<div align='center'><a onclick='showApprove(" . $row['IDEmployee'] . ")'><img src='images/approve.png' alt='' /></a>";
    echo "<a href=''><img src='images/reference.png' alt='' /></a>";
    echo '</td>';
    echo "</tr>";
}
echo "</table>";

mysql_close($connection);
?>